package demo;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;

/**
 * @author ZhuQi
 * @ClassName Demo
 * @Date 2022/10/17 14:23
 * @Version 1.0
 * @Description TODO
 */
public class Demo {

    // 双重大括号初始化
    static HashMap<String, Object> map = new HashMap<String, Object>(){{
        put("name","zhangsan");
        put("age","1");
    }};

    public static void main(String[] args) {
        CoffeeGirl coffeeGirl = new CoffeeGirl();
        System.out.println(coffeeGirl.getName());
        Person person = new CoffeeGirl();
        System.out.println(person.getName());
        Student student = new CoffeeGirl();
        System.out.println(student.getName());
        System.out.println(map);


        List<String> lists = Collections.nCopies(10, "zq");
        lists.forEach(System.out::println);
    }
}
